﻿/*****************************************************************
* Project: HFW Framework
*****************************************************************
* Developer: Hdhoan
* Date created: 11/2010
* Modified:
******************************************************************/
namespace HFW.Share
{
    using System;
    using System.Windows.Forms;

    public class MessageBoxEX
    {
        public static DialogResult Show(string text)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(text, " ", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(owner, text, " ", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption, MessageBoxButtons msgButtons)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(text, caption, msgButtons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(owner, text, caption, MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(text, caption, msgButtons, msgIcons, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(owner, text, caption, msgButtons, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons, MessageBoxDefaultButton msgDefaultButton)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(text, caption, msgButtons, msgIcons, msgDefaultButton);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(owner, text, caption, msgButtons, msgIcons, MessageBoxDefaultButton.Button1);
        }

        public static DialogResult Show(IWin32Window owner, string text, string caption, MessageBoxButtons msgButtons, MessageBoxIcon msgIcons, MessageBoxDefaultButton msgDefaultButton)
        {
            frmShowMessageDialog dialog = new frmShowMessageDialog();
            return dialog.ShowDialog(owner, text, caption, msgButtons, msgIcons, msgDefaultButton);
        }
    }
}

